<template>
    <el-menu ref="FileManager" v-show="FileManagerPanel" style="width: auto;">
              <el-menu-item>
                <el-input v-model="searchIndex" style="vertical-align: middle;width: 200px;" @change="getCurrentFolderIndex('',searchIndex,true)" @clear="getCurrentFolderIndex('',searchIndex,true)" placeholder="输入要搜索的文件夹名字" clearable></el-input>
                <el-button type="primary" @click="getCurrentFolderIndex('',searchIndex,true)" style="padding-left: 2px; margin-left: 10px;">
                  <el-icon><Search /></el-icon>
                  搜索
                </el-button>
                <el-button type="primary" @click="onBackPreviousClick" style="padding-left: 0px; margin-left: 10px;">
                  <el-icon><ArrowLeft /></el-icon>
                  上一级
                </el-button>
                <el-text style="margin-left: 10px;">当前路径:{{ CurrentFolderPath }}</el-text>
              </el-menu-item>
              <el-menu-item v-for="file in FileList" :key="file.FileName" @click="onFileBlockItemClick(file.FilePath, file.FileType)">
                <el-icon :size='25' style="margin-right: 5px;">
                  <Folder v-if="file.FileType === 'Folder'" />
                  <Coin v-else-if="file.FileType === 'Disk'" />
                  <Notebook v-else-if="file.FileType === 'Txt'" />
                  <Document v-else-if="file.FileType === 'Word'" />
                  <DataBoard v-else-if="file.FileType === 'PPT'" />
                  <TrendCharts v-else-if="file.FileType === 'Xls'" />
                  <Management v-else-if="file.FileType === 'Pdf'" />
                  <Box v-else-if="file.FileType === 'Zip'" />
                  <Film v-else-if="file.FileType === 'Video'" />
                  <Picture v-else-if="file.FileType === 'Photo'" />
                  <Files v-else-if="file.FileType === 'File'"/>
                </el-icon>
                {{ file.FileName }}
              </el-menu-item>
          </el-menu>
</template>

<script>
import { FileManager } from '@vue/composition-api'

export default FileManager({
    data(){
        return{
            
        }
    },
})
</script>
